From e3e65e5e602bfc80532e9e50630ce78c19477ff6 Mon Sep 17 00:00:00 2001 From: robertl Date: Mon, 9 Jul 2007 16:48:00 +0000 Subject: [PATCH] Add style tips to README.contrib. --- README.contrib | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.contrib b/README.contrib index b2f618286..6e447a29d 100644 --- a/README.contrib +++ b/README.contrib @@ -21,6 +21,28 @@ The entire world doesn't run . I've tested this code on at least five different OSes. If you find yourself wanting to insert compiler or OS specific magic, please resist. +Coding consistency is encouraged. The reality is we have a lot of code +that was written by different authors. Some code from other projects is +included. We don't have immutable rules about code style (indention, +curly location, whitespace rules, etc.) but we do ask that you try to +match what is around any code you modify. "When in Rome..." + +If writing new code, we'd prefer a style like: + + int + mumble(int whatever) + { + if (whatevever) { + return blah; + } + } + +...but if you're submitting a new source file that you intend to +maintain and are convinced that two space indents will make the world a +better place, knock yourself out. But if you need to add a line of code +to the above before "return blah" and do it with spaces instead of hard +tabs, that would be bad. + Submitting Patches ------------------ -- 2.30.2